package com.hsy.crm.web.web.report;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.vo.report.*;
import com.hsy.crm.web.domain.vo.store.StoreReportDetailVo;
import com.hsy.crm.web.service.impl.ReportService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/report")
public class ReportAction extends BaseAction {

    @Autowired
    ReportService reportService;

    @RequestMapping("/purchaseTrack")
    public String purchaseTrack(PurchaseTrackVo pageVo) {
        return Response.body(reportService.purchaseTrack(pageVo));
    }

    @RequestMapping("/purchaseDetail")
    public String purchaseDetail(PurchaseDetailVo pageVo) {
        return Response.body(reportService.purchaseDetail(pageVo));
    }

    @RequestMapping("/purchaseSum")
    public String purchaseSum(PurchaseSumVo pageVo) {
        return Response.body(reportService.purchaseSum(pageVo));
    }

    /*******************market*****************/

    @RequestMapping("/marketTrack")
    public String marketTrack(MarketTrackVo pageVo) {
        return Response.body(reportService.marketTrack(pageVo));
    }

    @RequestMapping("/marketDetail")
    public String marketDetail(MarketDetailVo pageVo) {
        return Response.body(reportService.marketDetail(pageVo));
    }

    @RequestMapping("/marketSum")
    public String marketSum(MarketSumVo pageVo) {
        return Response.body(reportService.marketSum(pageVo));
    }

    @RequestMapping("/marketProfit")
    public String marketProfit(MarketProfitVo pageVo) {
        return Response.body(reportService.marketProfit(pageVo));
    }

    @RequestMapping("/marketOrder")
    public String marketOrder(MarketProfitVo pageVo) {
        return Response.body(reportService.marketOrder(pageVo));
    }

    /*******************finance*****************/
    @RequestMapping("/customerComp")
    public String customerComp(CustomerCompVo pageVo) {
        return Response.body(reportService.customerComp(pageVo));
    }

    @RequestMapping("/vendorComp")
    public String vendorComp(VendorCompVo pageVo) {
        return Response.body(reportService.vendorComp(pageVo));
    }

    @RequestMapping("/profit")
    public String profit(ProfitVo pageVo) {
        return Response.body(reportService.profit(pageVo));
    }

    /*******************store*****************/
    @RequestMapping("/storeDetail")
    public String storeDetail(StoreReportDetailVo pageVo) {
        return Response.body(reportService.storeDetail(pageVo));
    }

    @RequestMapping("/storeSum")
    public String storeSum(StoreReportDetailVo pageVo) {
        return Response.body(reportService.storeSum(pageVo));
    }

}
